package com.panshi.api;

import com.panshi.vo.ArticleOkVO;
import com.panshi.vo.TitleVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(value = "zx-server", contextId = "detail")
public interface DetailApi {

    //所有标题
    @GetMapping("/zx/title")
    @ResponseBody
    List<TitleVO> listTitleVOs();

    //详情
    @GetMapping("/zx/detail/{id}")
    ArticleOkVO getArticleOkVO(@PathVariable int id);

    @GetMapping("/zx/detail/other/{sort}")
    List<ArticleOkVO> listDetailOtherArticleOkVOs(@PathVariable int sort);

}
